package com.example.fitnessservice.module.pojo;

import com.example.fitnessservice.module.utils.ConveterUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @Author:XuRui
 * @Date:2022/11/21 14:41
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Coach {
    private Integer id;
    private Integer directorId;
    private String name;
    private Integer age;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date birthday;
    private String phone;
    private String qq;
    private Integer sex;
    private Integer level;
    private String email;
    private Integer fans;
    private Integer balance;
    private Integer id1;//通过时间查出来的教练id

    private List<CourseDetails> courseDetails;
    private List<CourseDetailsCamp> camps;
    /*private List<CoachCourse> coachCourses;*/
    public void setAge() {
        this.age = ConveterUtils.birthdayToAge(this.birthday);
    }
}
